"""
ihrm 登录接口 对象层
"""
# 定义ihrm登录接口类
import requests


class IhrmLoginApi():
    @classmethod
    # 定义类方法
    def ihrm_login(cls, login_json):
        resp = requests.post(url="http://ihrm-java.itheima.net/api/sys/login",
                             headers={"Content-Type": "application/json"},
                             json=login_json)
        return resp


if __name__ == '__main__':
    login_json = {"mobile": "13800000002", "password": "929itheima.CN032@.20250330"}
    print(IhrmLoginApi.ihrm_login(login_json).json())
